<template>
    <div id="index">
      
    <router-view></router-view>
    <div class="tabbar">
    <span  @click="(currentIndex=index)" v-for="(item,index) in btns" :key="index" :class="{active:currentIndex==index}">{{item}}</span>
     <router-link to="/index/shangpin">首页</router-link>
     <router-link to="/index/bbt">爆爆团</router-link>
     <router-link to="/index/dingdan">订单</router-link>
     <router-link to="/index/my">我的</router-link>
    </div>
    </div>
  </template>
  
  <script>
  
  export default {
    name: 'index',
    data(){
    return{
        btns:[
        
       
        ],
      currentIndex:0,
    }
  },
  
  methods:{
       btn(index){
        console.log(index);
        this.btnsIndex=index
       }
      },
  }
  </script>
  
  <style scoped>
 .tabbar{
    width: 100%;
 }
  </style>
  